package com.jrx.anytxn.investor.dto.loan;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 联合贷放款请求实体类
 *
 * @author liuyang
 * @date 2020-05-18
 */
@ApiModel(value = "LoanReq对象", description = "联合贷放款请求实体类")
public class LoanReq implements Serializable {

    @ApiModelProperty(value = "客户订单id",required = true)
    @Size(max=32, message = "客户订单id不能超过32位")
    @NotEmpty(message = "客户订单id不可空")
    private String loanId;

    @ApiModelProperty(value = "客户id",required = true)
    @Size(max=16, message = "客户id不能超过16位")
    @NotEmpty(message = "客户id不可空")
    private String customerId;

    @ApiModelProperty(value = "租戶id",required = true)
    @Size(max=4, message = "租戶id不能超过4位")
    @NotEmpty(message = "租戶id不可空")
    private String tenantId;

    @ApiModelProperty(value = "流水号",required = true)
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成且不可为空")
    @NotEmpty(message = "流水号不可空")
    private String seqNo;

    @ApiModelProperty(value = "渠道",required = true)
    @Size(max=32, message = "渠道不能超过32位")
    @NotEmpty(message = "渠道不可空")
    private String channel;

    @ApiModelProperty(value = "产品id",required = true)
    @Size(max=32, message = "产品id不能超过32位")
    @NotEmpty(message = "产品id不可空")
    private String productId;

    @ApiModelProperty(value = "借款金额",required = true)
    private BigDecimal loanAmount;

    @ApiModelProperty(value = "还款方式",required = true)
    @Size(max=2, message = "还款方式不能超过2位")
    @NotEmpty(message = "还款方式不可空")
    private String amortMethod;

    @ApiModelProperty(value = "期数",required = true)
    private Integer tenor;

    private String investorInterestTableId; // 利息id

    private String investorPenaltyTableId; // 罚息id

    private String investorFeeTableId; // 费用id

    private String investorPrepayTableId; // 提前还款手续费id

    private String investorPayoffTableId; // 提前结清手续费id

    private Date businessDate; // 业务日期

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }

    public String getAmortMethod() {
        return amortMethod;
    }

    public void setAmortMethod(String amortMethod) {
        this.amortMethod = amortMethod;
    }

    public Integer getTenor() {
        return tenor;
    }

    public void setTenor(Integer tenor) {
        this.tenor = tenor;
    }

    public String getInvestorInterestTableId() {
        return investorInterestTableId;
    }

    public void setInvestorInterestTableId(String investorInterestTableId) {
        this.investorInterestTableId = investorInterestTableId;
    }

    public String getInvestorPenaltyTableId() {
        return investorPenaltyTableId;
    }

    public void setInvestorPenaltyTableId(String investorPenaltyTableId) {
        this.investorPenaltyTableId = investorPenaltyTableId;
    }

    public String getInvestorFeeTableId() {
        return investorFeeTableId;
    }

    public void setInvestorFeeTableId(String investorFeeTableId) {
        this.investorFeeTableId = investorFeeTableId;
    }

    public String getInvestorPrepayTableId() {
        return investorPrepayTableId;
    }

    public void setInvestorPrepayTableId(String investorPrepayTableId) {
        this.investorPrepayTableId = investorPrepayTableId;
    }

    public String getInvestorPayoffTableId() {
        return investorPayoffTableId;
    }

    public void setInvestorPayoffTableId(String investorPayoffTableId) {
        this.investorPayoffTableId = investorPayoffTableId;
    }

    public Date getBusinessDate() {
        return businessDate;
    }

    public void setBusinessDate(Date businessDate) {
        this.businessDate = businessDate;
    }
}
